package com.ywl.exercise.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Basic;


@Table(name = "categories", schema = "", catalog = "crazyguessimages")//对应的表名和数据库名
@Entity
public class CategoryEntity {
	private int categoryid; //类别编号
	private String categoryname; //类别名称
	
	@Column(name = "categoryid", nullable = false, insertable = true, updatable = true, length = 11, precision = 0)
    @Id //自增的id，主键
    @GeneratedValue
    public int getCategoryid() {
		return categoryid;
	}
	public void setCategoryid(int categoryid) {
		this.categoryid = categoryid;
	}
	
	@Column(name = "categoryname", nullable = true, insertable = true, updatable = true, length = 20, precision = 0)
    @Basic
	public String getCategoryname() {
		return categoryname;
	}
	public void setCategoryname(String categoryname) {
		this.categoryname = categoryname;
	}
	
	
}
